/*
package com.fosu.web.controller;


import com.fosu.com.fosu.dao.*;
import com.fosu.domain.CustomizeCategories;
import com.fosu.domain.ProductCategories;
import com.fosu.vo.ProductList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

*/
/**
 * @author manno
 * @date 2020/10/14
 * 首页接口类
 *//*

@RestController
@CrossOrigin
public class ProductListController
{
    @Autowired
    ProductListDao productListDao;
    @Autowired
    ProductImgDao productImgDao;
    @Autowired
    LabelDao labelDao;
    @Autowired
    ProductCategoriesDao productCategoriesDao;
    @Autowired
    CustomizeCategoriesDao customizeCategoriesDao;

    */
/**
     * 获取首页最新商品信息接口,一次最多获取20条
     * 待解决问题,自定义标签的json字串冗余：
     * 期望:"customizeCategories":["category":[{"zqa1"},{"zqa2"},{"zqa3"}]]
     * "customizeCategories":[{"category":"zqa1"},{"category":"zqa2"},{"category":"zqa3"}]
     * 实现要把customizeCategories中的category换成String[]格式,并写一个自定义的TypeHandler
     * 告知mybatis要把从数据库获得多个的varchar类型都放进数组里
     *//*

    @GetMapping("/getProducts")
    public List<ProductList> getProducts()
    {
        List<ProductList> products = productListDao.getProducts();
        for (ProductList p : products)
        {
            */
/**封装商品的标签组、图片组、类别组*//*

            p.setLabels(labelDao.findLabelByProductId(p.getProductId()));
            p.setProductImgs(productImgDao.findProductImgByProductId(p.getProductId()));
            ProductCategories categories = productCategoriesDao.findCategoriesByProductId(p.getProductId());
            List<CustomizeCategories> customizeCategories = customizeCategoriesDao.findCustomizeCategoriesById(categories.getCustomizeCategoriesId());
            */
/**拼接自定义类别字串*//*

            if (customizeCategories.size() != 0)
            {
                List<String> customizeCategoriesList = new ArrayList<>();
                for (CustomizeCategories c : customizeCategories)
                {
                    customizeCategoriesList.add(new String(c.getCategory()));
                }
                */
/**自定义类别字串封装到类别组中*//*

                categories.setCustomizeCategories(customizeCategoriesList);
            }
            */
/**封装自定义类别字串到商品信息中*//*

            p.setProductCategories(categories);
        }
        return products;
    }



*/
/*    @Around("getProducts()")
    public Object packageProduct(ProceedingJoinPoint joinPoint) throws Throwable
    {
        try {
            System.out.println("around");
            return joinPoint.proceed();
        } catch (Throwable e) {
            e.printStackTrace();
            throw e;
        } finally {
            System.out.println("around");
        }
    }*//*


}
*/
